package com.jd.org.domain;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.jd.basic.domain.BaseDomain;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {

    // 部门编号
    private String sn;
    // 部门名称
    private String name;
    // 部门状态：禁用启用
    private Integer state;
    //部门经理的ID - 对应t_employee
    private Long manager_id;
    //上级部门ID - 对应t_department
    private Long parent_id;
    //上级部门ID - 对应t_department
    private Department parent;
    private Employee manager;
    //用来保存当前部门的子部门，属性名要于elementUi组件中的属性一致，不能改
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
